import request from '@/utils/request'

// 获取消息列表
export function getNotifications(params) {
  return request({
    url: '/api/notifications',
    method: 'get',
    params
  })
}

// 标记消息已读
export function readNotification(id) {
  return request({
    url: `/api/notifications/${id}/read`,
    method: 'put'
  })
}

// 标记全部已读
export function readAllNotifications() {
  return request({
    url: '/api/notifications/read-all',
    method: 'put'
  })
}

// 清空消息
export function clearNotifications() {
  return request({
    url: '/api/notifications/clear',
    method: 'delete'
  })
}

// 获取未读消息数量
export function getUnreadCount() {
  return request({
    url: '/api/notifications/unread-count',
    method: 'get'
  })
} 